package com.dwxt.mall.service.feign;

import com.dwxt.common.base.BaseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient("pay")
public interface PayService {

    @PostMapping("/pay/wx")
    BaseResult payWithWX(@RequestBody Map<String, String> params);

    @PostMapping("/pay/zfb")
    BaseResult payWithZFB(@RequestBody Map<String, String> params);

    @RequestMapping("/pay/wx/refund")
    BaseResult wxRefund(@RequestParam String orderId, @RequestParam Double price);

    @RequestMapping("/pay/zfb/refund")
    BaseResult zfbRefund(@RequestParam String orderId, @RequestParam Double price);


}
